﻿using System;

namespace Samurai.Infrastructure
{
    [Serializable]
    public class Movie : ILocatable
    {
        public int ID { get; set; }

        public string Title { get; set; }
        public string Year { get; set; }
        public string Rating { get; set; }
        public string Url { get; set; }
        public string[] Genres { get; set; }
        public string Path { get; set; }
        public string Error { get; set; }

        public byte[] Image { get; set; }

        public string MovieTitleWithYear
        {
            get
            {
                return string.Format("{0} ({1})", Title, Year);
            }
        }

        public string ImageUrl { get; set; }

        public bool IsImageUrlValid()
        {
            return ImageUrl != null && !ImageUrl.Equals("N/A");

            //"N/A"
        }
    }
}
